package com.jivesoftware.forum.model;


public class ForumMessageAdminBean
{

	/**
	 * Returns a message from the thread based on its id.
	 * 
	 * @param messageID
	 *            the ID of the message to get from the thread.
	 */
	public ForumMessageBean getMessage(Authorization authorization,
			long messageID) throws ForumMessageNotFoundException,
			UnauthorizedException
	{
		return null;
	}

	/**
	 * change a message.
	 * 
	 * @param message
	 *            the message change to.
	 */
	public void updateMessage(Authorization authorization,
			ForumMessageBean newMessage) throws ForumMessageNotFoundException,
			UnauthorizedException
	{
	}

	/**
	 * Factory method to create a message.
	 * 
	 * @param parentMessage
	 *            some message in the thread that will be parent
	 * @param newMessage
	 *            message to add to the thread under the parent
	 * @throws UnauthorizedException
	 *             if does not have CREATE_MESSAGE permissions.
	 */
	public ForumMessageBean createMessage(Authorization authorization,
			long parentMessage, ForumMessageBean newMessage)
			throws UnauthorizedException
	{
		return null;
	}

	/**
	 * Deletes a message in the thread. Deleting a message also deletes all of
	 * its children messages. The search index and other resources that
	 * referenced the message and its children will also be updated
	 * appropriately.
	 * 
	 * @throws UnauthorizedException
	 *             if does not have ADMIN permissions.
	 */
	public void deleteMessage(Authorization authorization, long message)
			throws UnauthorizedException, ForumMessageNotFoundException
	{

	}

	/**
	 * Returns the number of messages based on the specified result filter. This
	 * includes the root message. So, to find the number of replies to the root
	 * message, subtract one from the answer of this method.
	 * 
	 * @param resultFilter
	 *            a filter to limit the message count query, such as date or
	 *            moderation value range.
	 */
	public int getMessageCount(Authorization authorization, long forum,
			long thread, ResultFilter resultFilter)
			throws UnauthorizedException
	{
		return 0;
	}

	/**
	 * Returns a Iterator for all the messages that match the criteria specified
	 * by the ResultFilter.
	 * 
	 * @param resultFilter
	 *            a ResultFilter object to perform filtering and sorting with.
	 * @return an array for the messages ID that match the ResultFilter.
	 */
	public long[] messages(Authorization authorization, long forum,
			long thread, ResultFilter resultFilter)
			throws UnauthorizedException
	{
		return null;
	}

	/**
	 * query the specified list of forums.
	 * 
	 * @return an array for the messages ID
	 */
	public long[] query(Authorization authorization, long[] forums,
			QueryBean query) throws UnauthorizedException
	{
		return null;
	}

	/**
	 * Returns an extended property of the message. Each message can have an
	 * arbitrary number of extended properties. This lets particular skins or
	 * filters provide enhanced functionality that is not part of the base
	 * interface.
	 * <p>
	 * 
	 * For security reasons, you should enable an HTML filter in case properties
	 * contain malicious HTML code.
	 * 
	 * @param name
	 *            the name of the property to get.
	 * @return the value of the property.
	 */
	public String getProperty(String name)
	{
		return null;
	}

	/**
	 * Sets an extended property of the message. Each message can have an
	 * arbitrary number of extended properties. This lets particular skins or
	 * filters provide enhanced functionality that is not part of the base
	 * interface.
	 * 
	 * @param name
	 *            the name of the property to set.
	 * @param value
	 *            the new value for the property.
	 * @throws UnauthorizedException
	 *             if not allowed to edit the message.
	 */
	public void setProperty(Authorization authorization, String name,
			String value) throws UnauthorizedException
	{

	}

	/**
	 * Deletes an extended property. If the property specified by
	 * <code>name</code> does not exist, this method will do nothing.
	 * 
	 * @param name
	 *            the name of the property to delete.
	 * @throws UnauthorizedException
	 *             if not allowed to edit the message.
	 */
	public void deleteProperty(Authorization authorization, String name)
			throws UnauthorizedException

	{

	}

	/**
	 * Returns an Iterator for all the names of the message properties.
	 * 
	 * @return an Iterator for the names of all message properties.
	 */
	public String[] propertyNames()
	{
		return null;
	}
}
